#include "SearchCommand.h"

//@author A0097379H
SearchCommand::SearchCommand(string inputSentence)
{
	storage=Storage::getInstance();
	restOfCommand = inputSentence;
}

SearchCommand::~SearchCommand()
{

}

string SearchCommand::Execute()
{
	if(restOfCommand.empty())
		return "empty command";
	while (restOfCommand[0] == ' '){
		restOfCommand.erase(restOfCommand.begin(),restOfCommand.begin()+1);
	}
	return search.executeCommand(restOfCommand, storage->getTaskList());
}
string SearchCommand::Unexecute()
{
	return "";
}
